<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pForm.jsp" %>
<title>用户新增页面</title>
</head>
<body>
	<div class="easyui-panel" data-options="fit:true,border:false" style="padding:10px;">
		<!-- 替换自动form表单 -->
		<form id="easyuiForm" method="post" action="/console/com.fs.base.pojo.User/newAdd"   >
		 <!--类名属性及默认主键id-->
		 <input type="hidden" name="className" value="com.fs.base.pojo.User" />
		 <input type="hidden" name="id" value="" />
		 <input type="hidden" name="dept" value="" />
		  <input type="hidden" name="duty" value="" />
		 <div style="margin-bottom:20px">
		  	<input class="easyui-textbox" name="account" style="width:240px;"  data-options="label:'用户账号:',required:true,validType:{remote:['/console/user/remote','account'],length:[0,15]}" />
			<input class="easyui-textbox" name="pwd" style="width:240px;" data-options="label:'用户密码:',required:true" />
		 </div>
		 
		  <div style="margin-bottom:20px">
		  	<input class="easyui-textbox" name="nickName" style="width:240px;" data-options="label:'姓名:',required:true" />
		  	<select class="easyui-combobox" name="gender" style="width:240px;" data-options="label:'性别:'" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A1&text=男&pCode_searchType=eq" >
		 	</select>
		 </div>
	
		<div style="margin-bottom:20px">
		 	<select class="easyui-combotreegrid" name="orgNo" style="width:240px;" data-options="label:'组织结构:',panelWidth:300,panelWidth:450,    
		           	idField: 'orgNo', 
		           	missingMessage:'必填项',
					treeField: 'orgName',
					sortName:'orgOrder',
					sortOrder:'asc',
		            url:'/console/com.fs.base.pojo.Org/list', 
		            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
		            columns:[[    
		                {field:'orgName',			width:190,	title:'组织名称' }
			         	,{field:'orgType',			width:70,	title:'分类' }
			         	,{field:'orgNo',				width:100,	title:'组织编码' }
			         	,{field:'orgLeaderName',	width:70,	title:'负责人'}
		            ]]"></select>
		     <select class="easyui-combogrid" id="dept"  style="width:240px;" data-options="label:'项目部:',panelWidth:300,  
		           	idField: 'orgNo', 
		           	missingMessage:'必填项',
					textField: 'orgName',
					sortName:'orgOrder',
					sortOrder:'asc',
					multiple:true,
					onChange:deptChange,
		            url:'/console/com.fs.base.pojo.Org/list', 
		            queryParams:{orgType:'项目部',orgType_searchType:'eq'},
		            columns:[[    
		                {field:'orgName',			width:190,	title:'组织名称' }
			         	,{field:'orgType',			width:70,	title:'分类' }
		            ]]"></select>       
		 </div>

		 <div style="margin-bottom:20px">
		  	<input class="easyui-textbox" name="mobile" style="width:240px;" data-options="label:'手机:',required:false" />
		    <input class="easyui-numberbox" name="age" style="width:240px;" data-options="label:'年龄:',required:false,min:0" />
		 </div>

		 <div style="margin-bottom:20px">
		 	<select class="easyui-combobox" id="duty"  style="width:240px;" data-options="label:'职务:',panelHeight:'100px',multiple:true" 
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A7&pCode_searchType=eq" >
		 	</select>
		 	<!-- 
		 	<select class="easyui-combobox"  id="dept"  style="width:240px;" data-options="label:'项目部:',panelHeight:'100px',multiple:true,onChange:deptChange"
				url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=A5&pCode_searchType=eq" >
		 	</select>
		 	 -->
		 	 <input class="easyui-textbox" name="email" style="width:240px;" data-options="label:'邮箱:',required:false" />
		 </div>
		 <div style="margin-bottom:20px">
		 	<input class="easyui-textbox easyui-validatebox" name="remark" multiline="true" style="width:500px;height:50px;" data-options="label:'备注:',required:false,validType:'length[0,500]'" />
		 </div>
		</form>
		<!-- 
		<div style="padding:5px 0" id="form_butons">
			<a href="javascript:void(0)" id="f_btn_submit" class="easyui-linkbutton" data-options="iconCls:'icon-edit'"  style="width:80px">提交</a>
			<a href="javascript:void(0)" id="f_btn_close" class="easyui-linkbutton" data-options="iconCls:'icon-no'"  style="width:80px">关闭</a>  
		</div>
		 -->
	</div>
	
</body>
<script>
/*项目部数据切换*/
function deptChange(newValue, oldValue){
	$("input[name=dept]").val(newValue.join(","));
}

fn.onBeforeSubmitForm = function(){
	var dutyText = $('#duty').combobox('getText');
	$("input[name=duty]").val(dutyText);
	return true;
};
</script>
</html>